import { Controller, Post, Body } from '@nestjs/common';
import { MailService } from "./mail.service";
import { SendLoginCode } from "@dto/mail.dto";

@Controller('mail')
export class MailController {
    constructor(private readonly mailService: MailService) {
    }

    /**
     * 发送登录验证码
     * @param {SendLoginCode} data
     */
    @Post('/send_login_code')
    sendLoginCode(@Body() data: SendLoginCode) {
        return this.mailService.sendLoginCode(data)
    }
}
